package com.csu.cphone.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.csu.cphone.vo.ResultVo;
import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation;
import com.wordnik.swagger.annotations.ApiParam;

/**
 * @项目名称：cphone
 * @类名称：RecycleController
 * @类描述：
 * @创建人：Tangc
 * @创建时间：2017年9月4日 上午10:37:18
 * @company:步步高教育电子有限公司
 */
@Controller
@RequestMapping("/recycle")
@Api(value = "recycle", description = "手机回收")
public class RecycleController
{
    
    @ResponseBody
    @ApiOperation(value = "获取机器回收题目", notes = "登录校验，成功后返回司机信息")
    @RequestMapping(value = "/login", method = RequestMethod.POST, produces = { "application/json; charset=utf-8" })
    public ResultVo<Object> login(HttpServletRequest request, @ApiParam(value = "登录名")
    @RequestParam(value = "loginName", required = true)
    String loginName, @ApiParam(value = "登录密码")
    @RequestParam(value = "password", required = true)
    String password, @ApiParam(value = "机器码")
    @RequestParam(value = "machineId", required = true)
    String machineId)
    {
        return new ResultVo<Object>();
    }

    
    
    @ResponseBody
    @ApiOperation(value = "报价结果", notes = "根据回收参数计算报价")
    @RequestMapping(value = "/offer", method = RequestMethod.POST, produces = { "application/json; charset=utf-8" })
    public ResultVo<Object> offer(HttpServletRequest request, @ApiParam(value = "登录名")
    @RequestParam(value = "loginName", required = true)
    String loginName, @ApiParam(value = "登录密码")
    @RequestParam(value = "password", required = true)
    String password, @ApiParam(value = "机器码")
    @RequestParam(value = "machineId", required = true)
    String machineId)
    {
        return new ResultVo<Object>();
    }

}
